package com.pet.platform.mapper;

import com.pet.platform.entity.Post;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;

@Mapper
public interface PostMapper {
    Post findById(@Param("id") Long id);
    
    List<Post> findList(Map<String, Object> params);
    
    Long count(Map<String, Object> params);
    
    void insert(Post post);
    
    void update(Post post);
    
    void delete(@Param("id") Long id);
    
    void updateLikes(@Param("id") Long id, @Param("increment") boolean increment);
    
    void updateComments(@Param("id") Long id, @Param("increment") boolean increment);
} 